#!/usr/bin/perl
use strict;
package cshelp;
sub cshelp {
my ($csnum,$csnick,$VER,$NETWORK,$remote,$input) = @_;
if ($$input[4] ne "") {
    $$input[4] = lc($$input[4]);
    if (!(-e "./help/cs/$$input[4].txt")) {
	print $remote "$csnum O $$input[0] :No Such help command.\n";
    }
    else {
	print $remote "$csnum O $$input[0] :\026Help Menu For $csnick\n";

	open (HELP,"./help/cs/$$input[4].txt");
	my @HELP = <HELP>; close (HELP);
	foreach my $i (@HELP) {
	    chomp $i;
	    my $bold = "\002";my $newspace = " ";
	    $i =~ s/%b%/$bold/i;
	    undef $bold;
	    $i =~ s/%X%/$csnick/i;
	    $i =~ s/%n%/$newspace/g;
	    undef $newspace;
	    print $remote "$csnum O $$input[0] :$i\n";
	}
	undef @HELP;
    }
}
else {

my $notice = "$csnum O $$input[0]";
print $remote "$csnum O $$input[0] :\026Help Menu For $csnick        - $VER\n";
print $remote "$csnum O $$input[0] :=========================================\n";
print $remote "$notice :$csnick is $NETWORK\'s Channel Services Bot.\n";
print $remote "$notice : \n";
print $remote "$notice : \n";
print $remote "$notice :Level 000: REGISTER ACCESS CHANINFO HELP VERSION UPTIME\n";
print $remote "$notice : \n";
print $remote "$notice :Level 050: VOICEME KEY INVITE\n";
print $remote "$notice : \n";
print $remote "$notice :Level 100: OPME VOICE\n";
print $remote "$notice : \n";
print $remote "$notice :Level 150: OP DEOP\n";
print $remote "$notice : \n";
print $remote "$notice :Level 400: AOP\n";
print $remote "$notice : \n";
print $remote "$notice :Level 450: ADD REMOVE EDIT LIST\n";
print $remote "$notice : \n";
print $remote "$notice :Level 499: CYCLE\n";
print $remote "$notice : \n";
print $remote "$notice :Level 500: DROP SETURL\n";
print $remote "$notice : \n";
print $remote "$csnum O $$input[0] :=========================================\n";
}
}
1;
